<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<title>新闻发布系统</title>
</head>
<body>
<table width="778" border="0" cellpadding="0" cellspacing="6" class="border">
  <tr><td align="center" ><h1><a href="index.php">新闻发布系统</a></h1></td></tr>
</table>
<?php
	//判断当前是否为管理模式，如果是，则显示管理导航
	if( $_SESSION["admin"]=="1" ) {
?>
<table width="778" border="0" cellpadding="0" cellspacing="0" class="border">
  <tr> 
    <td height="10" align="center"> 
  <table width="766" border="0" cellpadding="0" cellspacing="6" class="pageSeparatorAdmin">
    <tr> 
      <td align="left">你已经登陆为管理员，当前为管理模式：&nbsp;
		<a href="admin_addnews.php">添加新闻</a>
			 | <a href="admin_addcategory.php" >添加栏目</a>
			 | <a href="http://driver.blueidea.com" target=_blank>用户管理</a></td>
    </tr>
  </table></td>
  </tr>
</table>
<?php 
	}
?>
<table width="778" border="0" cellpadding="0" cellspacing="0" class="border">
  <tr> 
    <td height="10" align="center"> 
    <table width="766" border="0" cellpadding="0" cellspacing="6" class="pageSeparator">
        <tr> 
          <td height="10">&nbsp;</td>
          <td align="right">
          	  <a href="index.php">首页</a>
          	  <a href="list.php">所有类别</a>
<?php
	include("dbconnect.inc.php");
	include("config.inc.php");
	$res =mysql_query("select * from new_class order by order_id");
	while($row =mysql_fetch_array($res)) {
		$categorys[$row["news_id"]] = $row["nclass_name"];
		echo " | <a href='list.php?category={$row['news_id']}'>{$row['nclass_name']}</a>";
		//如果当前是管理模式，则显示栏目的编辑链接
		if($_SESSION["admin"]) {
			echo ' [<a href="admin_editcategory.php?id='.$row['news_id'].'">
			<font color="blue">编辑</font></a>]';
		}
	}
?>
         </td></tr>
      </table></td></tr>
</table>